// 引入axios | 路径配置
import { AJAX_PATH } from "@/services/config.js";

// 导入 封装的 有权限请求2
import { HTTP_LIMITED } from "@/utils/axios.js";
class CaiGouRuKuHttp extends HTTP_LIMITED {
  //↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘退库接口↙↙↙↙↙↙↙↙↙↙↙↙↙↙↙↙

  //退库申请-根据标识获得单据号
  getDocumetByString(data) {
    return this._get(AJAX_PATH.getDocumetByString + data);
  }
  //根据表头ID生成源单物品表(用于退库)
  queryRequestList_back(data) {
    return this._get(AJAX_PATH.queryRequestList_back + data);
  }
  // 根据出入库表头ID查询物品信息（采购入库申请退库用）
  getqueryObjectInformationBy(data) {
    return this._get(AJAX_PATH.getqueryObjectInformationBy + data);
  }
  //根据退库申请生成源单(用于退库)--上table用
  createSourceList_back(data) {
    return this._get(AJAX_PATH.createSourceList_back + data);
  }
  //↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↖↖↖↖↖↖↖↖↖↖↖↖↖↖↖↖↖↖

  //↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘↘退库申请接口↙↙↙↙↙↙↙↙↙↙↙↙↙
  // 删除入库单
  getturnrequestformdelete_back_delete(queryPath) {
    return this._get(AJAX_PATH.getturnrequestformdelete_back_delete + queryPath);
  }
  //退库申请表表头-保存   --退库申请的保存-用
  savewarehousereturnrequest_back(data) {
    return this._post(AJAX_PATH.savewarehousereturnrequest_back, data);
  }
  // 退库保存
  saveOutStockInfo_back(data) {
    return this._post(AJAX_PATH.saveOutStockInfo_back, data);
  }
  //生成出入库源单列表（采购入库退库用）  --退库申请的源单上table用
  generateSourceList_back(data) {
    return this._get(AJAX_PATH.generateSourceList_back + data);
  }
  //根据出入库表头ID查询所有物品信息 --下table用
  getqueryContentInformationBy_back(data) {
    return this._get(AJAX_PATH.getqueryContentInformationBy_back + data);
  }
  //退库申请的列表
  getwarehousereturnrequestlist_back(data) {
    return this._get(AJAX_PATH.getwarehousereturnrequestlist_back + data);
  }
  //退库申请表表头-修改
  warehousereturnrequest_back_check(data) {
    return this._post(AJAX_PATH.warehousereturnrequest_back_check, data);
  }
  //↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↖↖↖↖↖↖↖↖↖↖↖↖↖↖↖↖↖↖
  //采购入库退库申请-修改-下table  用于状态审核开启关闭标志位修改
  updateInOrOutStorageOrderAndGoods(data) {
    return this._post(AJAX_PATH.updateInOrOutStorageOrderAndGoods, data);
  }

  //采购订单表-修改-上table  用于状态审核开启关闭标志位修改
  updatepurchaseaddorder(data) {
    return this._post(AJAX_PATH.updatepurchaseaddorder, data);
  }
  //采购物品信息-修改-下table- 用于状态审核开启关闭标志位修改
  updatepurchaseiteminformation(data) {
    return this._post(AJAX_PATH.updatepurchaseiteminformation, data);
  }
  //根据姓名查询用户信息（后端模糊查询
  searchUserInfoByUserName(data) {
    return this._get(AJAX_PATH.searchUserInfoByUserName + data);
  }

  //业务类型-列表
  getsyncbusinesstype_U8c() {
    return this._get(AJAX_PATH.getsyncbusinesstype_U8c, {});
  }
  //库存组织-返回全部库存组织编码和库存组织名称
  getAllCodeName() {
    return this._get(AJAX_PATH.getAllCodeName, {});
  }

  //获取单据号
  getDocumentNo() {
    return this._post(AJAX_PATH.getWarehouseDocumentNo, {});
  }
  //获取批次号
  getBatchNumber() {
    return this._get(AJAX_PATH.getBatchNumber, {});
  }
  //获取订单编号
  getApplyOrder() {
    return this._post(AJAX_PATH.getOrder, {});
  }

   //获取承包户列表
   getContractorList() {
    return this._get(AJAX_PATH.getContractorList);
  }
  //获取供应商列表信息
  getSupplierList() {
    return this._get(AJAX_PATH.getSupplierList, {});
  }
  //获取收发类别列表
  getReceiveSendTypeList() {
    return this._get(AJAX_PATH.getReceiveSendTypeList, {});
  }
  //获取采购入库单据号列表信息
  getDocumentList(queryPath) {
    return this._get(AJAX_PATH.getDocumentList + queryPath);
  }
  //获取仓位列表信息
  getPositionList() {
    return this._get(AJAX_PATH.getPositionList, {});
  }
  getStorageGoodsList(queryPath) {
    return this._get(AJAX_PATH.getStorageGoodsList + queryPath);
  }
  // 通过id获取入库订单信息
  getInStorageInfoById(queryPath) {
    return this._get(AJAX_PATH.getInStorageInfoById + queryPath);
  }
  // 入库单
  InOrOutStorageOrder(data) {
    return this._post(AJAX_PATH.InOrOutStorageOrder, data);
  }
  // 备货通知申请
  StockNoticeSave(queryPath, data) {
    return this._post(AJAX_PATH.StockNoticeSave + queryPath, data);
  }

  // 更新入库单
  updateInOrOutStorageOrder(data) {
    return this._post(AJAX_PATH.updateInOrOutStorageOrder, data);
  }
  // 删除入库单
  deleteInOrOutStorageOrder(queryPath) {
    return this._get(AJAX_PATH.deleteInOrOutStorageOrder + queryPath);
  }

  // 出库物品信息
  InOrOutStorageGoods(data) {
    return this._post(AJAX_PATH.InOrOutStorageGoods, data);
  }
  // 获取入库列表
  getInOrOutStorageList(queryPath) {
    return this._get(AJAX_PATH.getInOrOutStorageList + queryPath);
  }
   // 采购计划源单接口
   getPurchaserequest(queryPath) {
    return this._get(AJAX_PATH.getPurchaserequest + queryPath);
  }
    // 采购计划源单接口
    getPurchaserequestinfo(queryPath) {
      return this._get(AJAX_PATH.getPurchaserequestinfo + queryPath);
    }
  // 获取入库列表
  getInOrOutStorageOrderList(queryPath) {
    return this._get(AJAX_PATH.getInOrOutStorageOrderList + queryPath);
  }
  //获取存货名称列表
  getGoodsList() {
    return this._get(AJAX_PATH.getGoodsList, {});
  }
  // 更新入库物品信息
  updateInOrOutStorageGoods(data) {
    return this._post(AJAX_PATH.updateInOrOutStorageGoods, data);
  }
  //获取采购入库根据源单生成列表 rain-fix
  getPurchaseStorageList(query) {
    return this._get(AJAX_PATH.getPurchaseStorageList + query, {});
  }
  //获取采购订单详情
  getPurchaseStorageInfo(queryPath) {
    return this._get(AJAX_PATH.getPurchaseStorageInfo + queryPath);
  }
  //获取根据源单生成(结转单)列表
  getCarryOverList() {
    return this._get(AJAX_PATH.getCarryOverList, {});
  }
  //获取结转单详情
  getCarryOverInfo(queryPath) {
    return this._get(AJAX_PATH.getCarryOverInfo + queryPath);
  }
  //通过id删除产成品入库单
  deleteInOrOutStorageOrderAndGoods(queryPath) {
    return this._get(AJAX_PATH.deleteInOrOutStorageOrderAndGoods + queryPath);
  }
  saveRuKuZiDuanBiao(data) {
    return this._post(AJAX_PATH.saveRuKuZiDuanBiao, data);
  }

  // 数量验证-根据源单入库
  getBalanceInOutStockBySourceNumber(queryPath) {
    return this._post(AJAX_PATH.getBalanceInOutStockBySourceNumber, queryPath);
  }

  //列表-用于外购订单列表
  getsalepurchaseorder(queryPath) {
    return this._get(AJAX_PATH.getsalepurchaseorder + queryPath);
  }
  //用于外购订单详情
  getsalepurchaseorderinfo(queryPath) {
    return this._get(AJAX_PATH.getsalepurchaseorderinfo + queryPath);
  }
}
export { CaiGouRuKuHttp };
